#ifndef APPLYFRIENDRESPONSEMESSAGETOCLIENT_H
#define APPLYFRIENDRESPONSEMESSAGETOCLIENT_H

#include "./entities/message/superClass/message.h"


/*
Json数据格式
{
    "messageType": [ApplyFriendResponseToClient](int)
    "friendId": [friendId](string)
    "status": [status](string)
    "alias": [alias](string)
    "createTime": [createTime](string)
    "id": [id](int) 这个字段用来确保收到客户端收到好友申请审核结果
}
*/
class ApplyFriendResponseMessageToClient : public Message
{
public:
    ApplyFriendResponseMessageToClient() = delete;

    ApplyFriendResponseMessageToClient(const FriendId& friendId, const Nickname& nickname,
        const Status& status, const Alias& alias, const CreateTime& createTime, const Id& id);
    ApplyFriendResponseMessageToClient(const QJsonObject&);
    QJsonObject PackJsonData() const override;
    FriendId getFriendId() const;
    Nickname getNickname() const;
    Status getStatus() const;
    Alias getAlias() const;
    CreateTime getCreateTime() const;
    Id getId() const;

private:
    FriendId m_friendId;
    Nickname m_nickname;
    Status m_status;
    Alias m_alias;
    CreateTime m_createTime;
    Id m_id;
};

// 编译时注册
Q_DECLARE_METATYPE(ApplyFriendResponseMessageToClient)

#endif // APPLYFRIENDRESPONSEMESSAGETOCLIENT_H
